import React from "react";
import { BrowserRouter as Router, Route, Routes, Link } from "react-router-dom";
import HomePage from "./pages/HomePage.js";
import UserProfilePage from "./pages/UserProfilePage.js";
import "./App.css";

function App() {
  return (
    <Router>
      <div className="app">
        <nav className="sidebar">
          <ul>
            <li>
              <Link to="/">首页</Link>
            </li>
            <li>
              <Link to="/user">我的</Link>
            </li>
          </ul>
        </nav>
        <Routes>
          <Route path="/" element={<HomePage />} />
          <Route path="/user" element={<UserProfilePage />} />
        </Routes>
      </div>
    </Router>
  );
}

export default App;
